home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / taropyon / silib / inc / sifcm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  2.0 KB  |  72 lines

  1. /*************************************************************************
  2. *    File control libraray
  3. *************************************************************************/
  4.  
  5. #ifndef    _SIFCM_H
  6. #define    _SIFCM_H
  7.  
  8. #ifndef    _SITYPES_H
  9. #    include    <sitypes.h>
  10. #endif
  11.  
  12. /*----------------------------------------------------------------------*/
  13. #define    FCMDRV_MAX        (26)
  14. #define    FCMNAME_MAX        (15)
  15. #define    FCMDNAM_MAX        (255)
  16.  
  17. /*----------------------------------------------------------------------*/
  18. typedef struct _fcmfi_t                /* ファイル情報構造体        */
  19. {
  20.     struct _fcmfi_t        *next;
  21.     unsigned int        att;        /* 属性                        */
  22.     unsigned short        time, date;    /* 日付/時刻                */
  23.     long                siz;        /* ファイルサイズ            */
  24.     char                name[(FCMNAME_MAX+3) & (~3)];
  25. } FCMFI_T;
  26.  
  27.  
  28. /*----------------------------------------------------------------------*/
  29. typedef struct _fcmdir_t            /* ディレクトリ構造体        */
  30. {
  31.     struct _fcmdir_t    *next;
  32.     struct _fcmdir_t    *parent, *child;
  33.  
  34.     char                name[ (FCMDNAM_MAX + 3) & (~3) ];
  35.                                     /* ディレクトリ名                */
  36.     unsigned int        att;
  37.     unsigned int        stt;
  38.     void                *fcmDrv;
  39.  
  40.     int                    numFi;        /* ファイル総数                    */
  41.     int                    numFile;    /* ファイル数                    */
  42.     int                    numDir;        /* ディレクトリ数                */
  43.     FCMFI_T                *fiTop;        /* ディレクトリ内のファイル        */
  44. } FCMDIR_T;
  45.  
  46. /*----------------------------------------------------------------------*/
  47. #define    FCMDIR_HASH_MAX    (32)
  48.  
  49. typedef struct                        /* ドライブデータ構造体            */
  50. {
  51.     int                    drv;        /* ドライブ番号                    */
  52.     int                    typ;        /* ドライブ種別("FCM/drvtyp.h")    */
  53.     unsigned int        att;
  54.     unsigned int        stt;
  55.  
  56.     FCMDIR_T            *dirHash[FCMDIR_HASH_MAX];
  57. } FCMDRV_T;
  58.  
  59. #define    FCMDRV_STT_RESET    (0x0000_0001)    /* 再読み込みの必要あり    */
  60. #define    FCMDRV_STT_ERR        (0x1000_0000)    /* エラー                */
  61.  
  62. /*----------------------------------------------------------------------*/
  63. typedef struct                        /* ファイルコントロール構造体    */
  64. {
  65.     int                    numDrv;        /* 使用可能なドライブ数            */
  66.     FCMDRV_T            fcmDrv[FCMDRV_MAX];
  67. } FCMCTRL_T;
  68.  
  69. extern    FCMCTRL_T    *SiFcmCt;
  70.  
  71. #endif
  72.